package com.wits.platform.entity;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.wits.platform.common.constants.SysTabConstants;
@Entity
@Table(name="wits_systab_d")
public class SysTabD extends BaseEntity{



	/**
	 * 
	 */
	private static final long serialVersionUID = 5590432150011709495L;
	

	public SysTabD(){
		
	}
	
	public SysTabD(String thId,String tdId,String tdName){
		this.id.setThId(thId);
		this.id.setTdId(tdId);
		this.tdName=tdName;
	}
	
	private SysTabDPK id;
	
	private String langType;
	
	private String tdName;
	
	private Integer tdOrd;
	
	private String isEnable=SysTabConstants.SYSTAB_D_TNF_F;
	
	/**
	 * tdId冗余,页面提交json数据封装使用
	 */
	private String tdId;

	@EmbeddedId
	public SysTabDPK getId() {
		return id;
	}



	public void setId(SysTabDPK id) {
		this.id = id;
	}

	
	@Column(name="lang_type",length=20)
	public String getLangType() {
		return langType;
	}


	public void setLangType(String langType) {
		this.langType = langType;
	}


	@Column(name="td_name",length=20)
	public String getTdName() {
		return tdName;
	}



	public void setTdName(String tdName) {
		this.tdName = tdName;
	}


	@Column(name="td_ord")
	public Integer getTdOrd() {
		return tdOrd;
	}



	public void setTdOrd(Integer tdOrd) {
		this.tdOrd = tdOrd;
	}


	@Column(name="is_enable",length=1)
	public String getIsEnable() {
		return isEnable;
	}



	public void setIsEnable(String isEnable) {
		this.isEnable = isEnable;
	}

	@Transient
	public String getTdId() {
		return tdId;
	}

	public void setTdId(String tdId) {
		this.tdId = tdId;
	}
	
	@Override
	public String display() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String toString() {
		
		
		String remark=this.remark==null?"":this.remark;
		return "{thId:\"" + id.getThId() + "\",tdId:\"" + id.getTdId()
				+ "\",tdName:\"" + this.tdName + "\",isEnable:\""
				+ this.isEnable + "\",tdOrd:\"" + this.tdOrd
				+ "\",langType:\"" + this.langType 
				+"\",remark:\""+remark
				+ "\"}";
	}

}
